package cn.tedu.clubplus.mapper;

import cn.tedu.clubplus.entity.Club;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface clubMapper {

    @Select("select id,name,person,type,count,vip from club_list")
    List<Club> select();

    @Delete("delete from club_list where id=#{id}")
    void deleteById(int id);

    @Update("update club_list set name=#{name},person=#{person}," +
            "type=#{type},count=#{count},vip=#{vip} where id=#{id}")
    void update(Club club);

    @Insert("insert into club_list values(null,#{name},#{person},#{type}" +
            ",#{count},#{vip})")
    void insert(Club club);
}
